# 作者    : 周  文  俊
# 编写时间 :2024/10/24  9:11

from django import forms

from .models import Student


class StudentForm(forms.Form):
    name = forms.CharField(label='名字', max_length=100)
    age = forms.IntegerField(label='年龄', min_value=0, max_value=200)


class StudentModelForm(forms.ModelForm):
    class Meta:
        model = Student
        fields = ['name', 'age']
